1. Field of the Invention
The present invention relates to a packet transfer technique in a network.
2. Description of the Related Art
A Layer 2 Ethernet® switch (hereinafter, referred to as “L2 switch”) determines an output port as the destination of an input packet based on a MAC address. To this end, the L2 switch has an FDB (Forwarding Database). The FDB is a database for use in performing a full-width search of output port information using, as a search key, a destination MAC address which is an address indicating the destination of an input packet.
A Layer 3 Ethernet® switch (hereinafter, referred to as “L3 switch”) determines an output port as the destination of an input packet based on an IP address which is managed by an upper protocol than one managing the MAC address. In general, the L3 switch has an IP routing table for the processing of determining the output port as an IP address. With reference to FIG. 6, a configuration of the L3 switch will be described. FIG. 6 is a block diagram showing a configuration of a conventional L3 switch.
As shown in FIG. 6, an L3 switch 5 has an input port 51, a packet switching section 52, and an output port 53. The output port 53 is constituted by a plurality of output ports. The input port 51 includes an IP packet recognition section 511. The packet switching section 52 includes an FDB 521, an FDB reference section 522, a routing table reference section 523, a routing table 524, and an output port determination section 523.
The IP packet recognition section 511 determines whether an input packet includes an IP address. In the case where the input packet includes an IP address, the IP packet recognition section 511 passes the input packet to the routing table reference section 523. In the case where the input packet does not include an IP address, i.e., where the input packet includes a MAC address, the IP packet recognition section 511 passes the input packet to the FDB reference section 522. The FDB 521 associates the MAC address with any one of the plurality of output ports 53. The FDB reference section 522 performs a full-width search of the FDB 521 using the MAC address as a search key to thereby output any one of the output ports 53 as data. The routing table 524 associates the IP address with any one of the plurality of output ports 53. The routing table reference section 523 performs a partial match search of the routing table 524 using the IP address as a search key to thereby output any one of the output ports 53 as data. The output port determination section 523 determines the output port 53 output as data by the FDB reference section 522 or routing table reference section 523 as the output destination of a packet input to the input port 51.
As described above, the L3 switch 5 includes, in addition to the FDB 521, the routing table 524 for use in determining the output port 53 using the IP address as a search key. This is the most different point from the configuration of the L2 switch. Further, a common L3 switch 5 utilizes a TCAM (Ternary Content Addressable Memory) for realizing a function (L3 function provided by the routing table reference section 523 and routing table 524) of determining the output port using the IP address as a search key.
Although the L2 switch and L3 switch 5 have different configurations as described above, there is a case where a function of determining the output port based on the IP address is required for a switching hub used mainly as the L2 switch.
As a conventional art relating to the present invention, there is known a packet transfer apparatus in which an IP packet and an L2 packet are transferred by one switch when configuring a VLAN (refer to, e.g., Patent Document 1: Jpn. Pat. Appln. Laid-Open Publication No. 2007-68050).
However, in order to realize a function of determining the output port based on the IP address as a search key by the L2 switch, it is necessary to utilize the TCAM requiring large resources and large power consumption. Further, an overhead may occur when the switching hub used mainly as the L2 switch has the TCAM.